﻿using Microsoft.ApplicationBlocks.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DevExpressWebApplication1.Utils
{
    public class SupplierUtils
    {
        public static Boolean Insert(string supplierName, string company, string phone, string dob, string address, string group)
        {
            int id = SqlHelper.ExecuteNonQuery(DataServices.ConnectString, "sp_Supplier_Insert", supplierName, address, phone, dob, company, 1, group);
            bool isSuccess = false;
            if (id > 0)
                isSuccess = true;
            return isSuccess;
        }

        public static Boolean Update(string supllier_id, string supplierName, string company, string phone, string dob, string address, string group_id)
        {
            int id = SqlHelper.ExecuteNonQuery(DataServices.ConnectString, "sp_Supplier_Update", supllier_id, supplierName, company, phone, dob, address,group_id);
            bool isSuccess = false;
            if (id > 0)
                isSuccess = true;
            return isSuccess;
        }
    }
}